#include <forward_list>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
template <typename T>
std::ostream &operator<<(std::ostream &s, const std::forward_list<T> &v) {
  s.put('[');
  char comma[3] = {'\0', ' ', '\0'};
  for (const auto &e : v) {
    s << comma << e;
    comma[0] = ',';
  }
  return s << ']';
}

int main() {
  //   std::forward_list<std::string> words{"the", "frogurt", "is", "also",
  //                                        "cursed"};
  std::forward_list<std::string> words;
  //   std::cout << "words: " << words << '\n';

  // emplace_front (2)
  words.emplace_front("strawberry");
  std::cout << "words: " << words << '\n';

  forward_list<int> lst{9, 1, 5, 4, 6};
  lst.sort();
  cout << lst << endl;

  cout << words.max_size() << endl;
}